import request from '@/utils/request'


//申请领养宠物
export function adoptPet(adopt) {
  return request({
    url: '/web/adopt/adoptPet',
    method: 'post',
    data:adopt
  })
}

//顾客根据宠物id查看宠物信息
export function getPetByIdAndCanAdopt(id) {
  return request({
    url: '/pet/pets/getPetByIdAndCanAdopt',
    method: 'get',
    params: {
      id:id
    }
  })
}

// 获取首页展示的宠物信息
export function show() {
  return request({
    url: '/pet/pets/show',
    method: 'get'
  })
}

//获取可以领养的宠物信息
export function getPetList(){
  return request({
    url: '/pet/pets/getPetList',
    method: 'get'
  })
}


//宠物信息列表查询宠物信息
export function getPetListByPet(pet){
    return request({
        url: '/pet/pets/getPetListByPet',
        method: 'get',
        params:pet
    })
}














// 查询宠物信息列表
export function listPets(query) {
  return request({
    url: '/pet/pets/list',
    method: 'get',
    params: query
  })
}

// 查询宠物信息详细
export function getPets(petId) {
  return request({
    url: '/pet/pets/' + petId,
    method: 'get'
  })
}

// 新增宠物信息
export function addPets(data) {
  return request({
    url: '/pet/pets',
    method: 'post',
    data: data
  })
}

// 修改宠物信息
export function updatePets(data) {
  return request({
    url: '/pet/pets',
    method: 'put',
    data: data
  })
}

// 删除宠物信息
export function delPets(petId) {
  return request({
    url: '/pet/pets/' + petId,
    method: 'delete'
  })
}
